<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%@include file="/WEB-INF/commons/taglibs.jsp"%>
<%@include file="/WEB-INF/commons/common-header.jsp"%>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
	<form:form method="post" modelAttribute="role" id="form">
		<input type="hidden" name="_method" value="${_method }" />
		<!--content start-->
		<ul class="s_bodyR">
			<li class="s_li_head">用户角色管理&gt;角色编辑</li>
			<li class="s_adduTable">
				<table width="800" border="0">
					<tr>
						<td width="176" class="s_addutName">显示名称：</td>
						<td width="289"><form:input path="showName" id="showName"
								class="s_tInput" /></td>
						<td width="321" class="s_addutTips"></td>
					</tr>
					<tr>
						<td class="s_addutName">名称：</td>
						<td><form:input path="name" id="name" class="s_tInput" /></td>
						<td class="s_addutTips"></td>
					</tr>
					<tr>
						<td class="s_addutName">用户权限：</td>
						<td><c:forEach var="auth" items="${authorities }">
								<c:choose>
									<c:when test="${role.authoritiesTrans[auth.id] ne null }">
										<input type="checkbox" id="auth${auth.id }"
											name="authoritiesTrans[${auth.id }]" value="${auth.id}"
											checked="checked" />
										<label for="auth${auth.id }">${auth.name }</label>
									</c:when>
									<c:otherwise>
										<input type="checkbox" id="auth${auth.id }"
											name="authoritiesTrans[${auth.id }]" value="${auth.id}" />
										<label for="auth${auth.id }">${auth.name }</label>
									</c:otherwise>
								</c:choose>
							</c:forEach></td>
						<td class="s_addutTips">填选择用户权限</td>
					</tr>
					<tr>
						<td></td>
						<td><p class="s_brpLeft">
								<input id="ok" type="submit" value="提交" class="s_submit" />&nbsp;
								<button id=“back” class="s_button"
									onclick="javascript:history.go(-1);">返回</button>
							</p></td>
						<td></td>
					</tr>
				</table>
			</li>
		</ul>
		<!--content end-->

	</form:form>
</body>
</html>
